<?php $skin_url = $this->APP_STATIC_SERVER . '/skins/'. $this->APP_TEMPLATE . '/'. $this->APP_SKIN;?>
<?php if($this->enterprise) : ?>
<div class="subcolumns maintitle">
    <h4><?php echo $this->enterprise->company_name_vn; ?>
        <?php
            $arrRouteGeneral = array(
                'enterprise_id' => $this->enterprise->id,
                'enterprise_name' => Tomato_Utility_String::removeSign($this->enterprise->company_name_en, '-', true)
            );
        ?>
        <?php if($this->user_entity == 0) : ?>
        <a href="<?php echo $this->url($arrRouteGeneral, 'bizprofile_user_edit_general_info') ?>">
            <img src="<?php echo $skin_url; ?>/images/edit.png" />
        </a>
        <?php endif; ?>
    </h4>
    <span><?php echo $this->enterprise->company_name_en; ?></span>
</div>
<?php if($this->enterprise->frontend_active == 1 && $this->enterprise->deleted != 1): ?>
	<div class="subcolumns hlist4">
		<ul>
			<li <?php if($this->active == 'profile') :?>class="active"<?php endif; ?>>
				<?php
					$arrParamEnterprise = array(
						'enterprise_id' => $this->enterprise->id,
						'enterprise_name' => Tomato_Utility_String::removeSign($this->enterprise->company_name_en, '-', true)
					);
				?>
				<a href="<?php echo $this->url($arrParamEnterprise, 'bizprofile_enterprise_index') ?>"><span><?php echo $this->translator()->widget('menu2_profile'); ?></span></a>
			</li>
			<?php if(!$this->permission || $this->permission->media_permission  == 1   || $this->permission_viewall == 1) :?>
			<li <?php if($this->active == 'gallery') :?>class="active"<?php endif; ?>>
				<?php
					$arrParamGallery = array(
						'enterprise_id' => $this->enterprise->id,
						'enterprise_name' => Tomato_Utility_String::removeSign($this->enterprise->company_name_en, '-', true)
					);
				?>
				<a href="<?php echo $this->url($arrParamGallery, 'b2b_gallery_list');?>"><span><?php echo $this->translator()->widget('menu2_media'); ?></span></a>
			</li>
			<?php endif;?>
			<?php if(!$this->permission || $this->permission->blog_permission  == 1   || $this->permission_viewall == 1) :?>
			<li <?php if($this->active == 'blog') :?>class="active"<?php endif; ?>>
				<?php
					$arrParamBlog = array(
						'enterprise_id' => $this->enterprise->id,
						'enterprise_name' => Tomato_Utility_String::removeSign($this->enterprise->company_name_en, '-', true)
					);
				?>
				<a href="<?php echo $this->url($arrParamBlog, 'b2b_blog_list');?>"><span><?php echo $this->translator()->widget('menu2_blog'); ?></span></a>
			</li>
			<?php endif;?>
			<?php if(!$this->permission || $this->permission->messaging_permission  == 1   || $this->permission_viewall == 1) :?>
			<?php //if($this->user_entity == 0) :?>
			<li <?php if($this->active == 'message') :?>class="active"<?php endif; ?>>
				<?php
					$arrParamMessage = array(
						'enterprise_id' => $this->enterprise->id,
						'enterprise_name' => Tomato_Utility_String::removeSign($this->enterprise->company_name_en, '-', true)
					);
				?>
				<a href="<?php echo $this->url($arrParamMessage, 'bizprofile_message_inbox') ?>">
					<span>
						<?php echo $this->translator()->widget('menu2_message'); ?>
					</span>
					<?php if($this->count_unread_message > 0):?>
						<div class="notify-show" style="float:left; color: #FF0000;float: left;left: 68px;position: relative;top: -25px;font-size:11px;font-weight: bolder;">(<?php echo $this->count_unread_message;?>)</div>
					<?php endif; ?>
				</a>
			</li>
			<?php endif; ?>
			<?php if(!$this->permission || $this->permission->partner_permission  == 1   || $this->permission_viewall == 1) :?>
					<?php 
						$title ='';	
						if($this->count_unread_all > 0):							
							$title = sprintf($this->translator()->widget('tolltipMenuPartner'),$this->count_unread_partner).'\n';
							$title.= sprintf($this->translator()->widget('tolltipMenuPartnerRecomment'),$this->count_unread_recomment).'\n';							
					?>						
					<?php endif;?>
					
				<li <?php if($this->active == 'partner') :?>class="active"<?php endif; ?> id="linkMenuPartner">			
					<?php if($this->count_unread_all > 0):
							$title ='';	
							if($this->count_unread_partner)
								$title = '<li>'.sprintf($this->translator()->widget('tolltipMenuPartner'),$this->count_unread_partner).'</li>';
							if($this->count_unread_recomment){
								$title.= '<li>'.sprintf($this->translator()->widget('tolltipMenuPartnerRecomment'),$this->count_unread_recomment).'</li>';
							}
					?>	
							<?php
								$arrParamPartner = array(
									'enterprise_id' => $this->enterprise->id,
									'enterprise_name' => Tomato_Utility_String::removeSign($this->enterprise->company_name_en, '-', true)
								);
							?>
						<a href="<?php echo $this->url($arrParamPartner, 'bizprofile_partner_list'); ?>" >
							<span><?php echo $this->translator()->widget('menu2_partner'); ?></span>
							<?php  if($this->count_unread_all>0):?>
							<div class="notify-show" style="float:right;color: #FF0000;position: relative;top: -18px;left:-5px;font-size: 25px;">*</div>
						<?php endif; ?>
						</a>						
						<ul id="tootipPartnerMenu" style="background: #CCCCCC;list-style:none;display:inline;position:absolute;width:auto;border-radius: 5px;boder: 1px inset #CCCCCC;"><?php echo $title;?></ul>
						<script type="text/javascript">
							$(document).ready(function(){
								$("#tootipPartnerMenu").hide();
								$("#linkMenuPartner").mouseover(function(){
									$("#tootipPartnerMenu").show();
								});
								$("#linkMenuPartner").mouseout(function(){
									$("#tootipPartnerMenu").hide();
								});
							});
						</script>
					<?php else: ?>
							<?php
								$arrParamPartner = array(
									'enterprise_id' => $this->enterprise->id,
									'enterprise_name' => Tomato_Utility_String::removeSign($this->enterprise->company_name_en, '-', true)
								);
							?>
							<a href="<?php echo $this->url($arrParamPartner, 'bizprofile_partner_list')?>">
								<span><?php echo $this->translator()->widget('menu2_partner'); ?></span>
							</a>
					<?php endif; ?>
				</li>
			<?php endif; ?>
			<li <?php if($this->active == 'product') :?>class="active"<?php endif; ?>>
				<?php
					$arrParamProduct = array(
						'enterprise_id' => $this->enterprise->id,
						'enterprise_name' => Tomato_Utility_String::removeSign($this->enterprise->company_name_en, '-', true)
					);
				?>
				<a href="<?php echo $this->url($arrParamProduct, 'shop_product_products');?>"><span><?php echo $this->translator()->widget('menu2_products'); ?></span></a>
			</li>
		</ul>
	</div>
<?php endif;?>
<?php endif; ?>
<div>&nbsp;</div>